#ifndef CLIENT_SHM_POOL_H
#define CLIENT_SHM_POOL_H
//******************************************************************************
//*this code is protected by the GNU affero GPLv3
//*author:Sylvain BERTRAND <sylvain.bertrand AT gmail dot com>
//*                        <digital.ragnarok AT gmail dot com>
//******************************************************************************
struct shm_pool{//state stored in the object array of the client owner
  i fd;
  void *start;//0 if unmapped
  s32 sz;
};
struct client_obj;
struct client;
s8 shm_pool_new_visible(struct client *c,u32 shm_pool_id,i fd,s32 sz);
s8 shm_pool_create_buffer(struct client *c,s32 shm_pool_slot,
                       u32 shm_pool_buffer_id,s32 offset,s32 w,s32 h,s32 stride,
                                                                       u32 fmt);
s8 shm_pool_destroy(struct client *c,s32 shm_pool_slot);
s8 shm_pool_resize(struct client *c,s32 shm_pool_slot,s32 sz);
#endif
